<html lang="en">
	<head>
		<title>Contact</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="assets/css/bootstrap.css" rel="stylesheet">
		<link href="assets/css/smarketing.css" rel="stylesheet">
		<style type="text/css">
			@font-face {
				font-family: 'Bebas';
				src: url('assets/fonts/BEBAS___-webfont.eot');
				src: url('assets/fonts/BEBAS___-webfont.eot') format('embedded-opentype'),
					 url('assets/fonts/BEBAS___-webfont.woff') format('woff'),
					 url('assets/fonts/BEBAS___-webfont.ttf')  format('truetype'),
					 url('assets/fonts/BEBAS___-webfont.svg#Bebas') format('svg');
				}
		</style>
	</head>
	<body>
		<?php  
		// check for form submission - if it doesn't exist then send back to contact form  
		if (!isset($_POST["save"]) || $_POST["save"] != "contact") {  
		    header("Location: contact-form.php"); exit;  
		}  
		      
		// get the posted data  
		$name = $_POST["contact_name"];  
		$email_address = $_POST["contact_email"];  
		$message = $_POST["contact_message"];  
		      
		// check that a name was entered  
		if (empty ($name))  
		    $error = "You must enter your name.";  
		// check that an email address was entered  
		elseif (empty ($email_address))   
		    $error = "You must enter your email address.";  
		// check for a valid email address  
		elseif (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $email_address))  
		    $error = "You must enter a valid email address.";  
		// check that a message was entered  
		elseif (empty ($message))  
		    $error = "You must enter a message.";  
		          
		// check if an error was found - if there was, send the user back to the form  
		if (isset($error)) {  
		    header("Location: contact-form.php?e=".urlencode($error)); exit;  
		}  
		          
		// write the email content  
		$email_content = "Name: $name\n";  
		$email_content .= "Email Address: $email_address\n";  
		$email_content .= "Message:\n\n$message";  
		      
		// send the email  
		mail ("mail@example.com", "New Contact Message", $email_content);  
		      
		// send the user back to the form  
		header("Location: contact-form.php?s=".urlencode("Thank you for your message.")); exit;  
		  
		?>  
		<div class="navbar navbar-fixed-top navbar-inverse">
			<div class="navbar-inner">
				<div class="container">
					<ul class="nav">
						<a class="brand" href="Home.html">
							<img src="assets/img/smarketing_logo.png" alt>
						</a>
						<li>
							<a href="OurMission.html">About</a>
						</li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
								Events
								<b class="caret"></b>
							</a>
							<ul class="dropdown-menu">
								<li>
									<a href="UpcomingEvents.html">Upcoming</a>
								</li>
								<li>
									<a href="#">Archives <i class="icon-arrow-right"></i></a>
									<ul id="archives-menu" class="dropdown-menu sub-menu">
										<li>
											<a href="2012NetworkingNight.html">2012 Networking Night</a>
										</li>
										<li>
											<a href="2011NetworkingNight.html">2011 Networking Night</a>
										</li>
										<li>
											<a href="NielsenCaseCompetition.html">Nielsen Case Competition</a>
										</li>
									</ul>
								</li>
							</ul>
						</li>
						<li>
							<a href="Mentorship.html">Mentorship</a>
						</li>
						<li>
							<a href="ContactUs.html">Contact</a>
						</li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
								Contact
								<b class="caret"></b>
							</a>
							<ul class="dropdown-menu">
								<li>
									<a href="#">Talk to Us</a>
								</li>
								<li>
									<a href="#">Join Us</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</div>			
		</div>
		<div class="container">
			<div class="featurette-anchor">
				<h2 class="featurette-heading">Contact Us</h2>
				<hr>
				<form method="POST" action="contact-form-submission.php" class="form-horizontal">  
		            <div class="control-group">  
		                <label class="control-label" for="input1">Name</label>  
		                <div class="controls">  
		                    <input type="text" name="contact_name" id="input1" placeholder="Your name">  
		                </div>  
		            </div>  
		            <div class="control-group">  
		                <label class="control-label" for="input2">Email Address</label>  
		                <div class="controls">  
		                    <input type="text" name="contact_email" id="input2" placeholder="Your email address">  
		                </div>  
		            </div>  
		            <div class="control-group">  
		                <label class="control-label" for="input3">Message</label>  
		                <div class="controls">  
		                    <textarea name="contact_message" id="input3" rows="8" class="span5" placeholder="The message you want to send to me."></textarea>  
		                </div>  
		            </div>  
		            <div class="form-actions">  
		                <input type="hidden" name="save" value="contact">  
		                <button type="submit" class="btn btn-primary">Send</button>  
		            </div>  
		        </form>  
			</div>
			<hr>
			<footer>
				<p>&#169; Smarketing</p>
			</footer>
		</div>
		<script src="http://code.jquery.com/jquery.js"></script>
		<script src="assets/js/bootstrap.js"></script>
	</body>
</html>